package com.aloha.springframework.test.converter;

import com.aloha.springframework.beans.factory.annotation.Value;
import com.aloha.springframework.stereotype.Component;

import java.time.LocalDate;

/**
 * @author DaiZhiHeng
 * @date 2023/7/9 22:57
 */
@Component
public class User {

    @Value("${user.username}")
    private String name;

    @Value("9")
    private Integer age;

    @Value("1989-09-09")
    private LocalDate birthday;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", birthday=" + birthday +
                '}';
    }
}
